<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.6.0.js"></script>
</head>
<body>
<select>
    <option value="cd">成都</option>
    <option value="cq">重庆</option>
    <option value="zj" id="zj">浙江</option>
    <option value="sc" selected>四川</option>
</select>
<button id="button01">测试</button>
</body>
<script>
    $(function (){
        let selectElement = $("select")[0];
        console.log(selectElement);
        // selectElement.selectedIndex = 2;

        let selectOption = $("select option:selected");
        console.log(selectOption[0]);


        console.log($("select option:selected").val());
        console.log($("select option:selected").text());
        console.log($("#zj").val());
        console.log($.trim("  xxq  "));
        $("#button01").replaceWith("<font color='red'>上床</font>")
    })
</script>
</html>